home *** CD-ROM | disk | FTP | other *** search
- class FreshFramework
- {
- static var _simulation;
- static var m_isRunningLocally = true;
- static var m_isRunningLocalRemoteDebug = false;
- function FreshFramework()
- {
- }
- static function get _isRunningLocally()
- {
- return FreshFramework.m_isRunningLocally;
- }
- static function set _isRunningLocally(isRunningLocally)
- {
- FreshFramework.m_isRunningLocally = isRunningLocally;
- }
- static function get _isRunningLocalRemoteDebug()
- {
- return FreshFramework.m_isRunningLocalRemoteDebug;
- }
- static function set _isRunningLocalRemoteDebug(isRunningLocalRemoteDebug)
- {
- FreshFramework.m_isRunningLocalRemoteDebug = isRunningLocalRemoteDebug;
- }
- static function get _serverURL()
- {
- if(FreshFramework.m_isRunningLocalRemoteDebug)
- {
- return "http://www.jeffwofford.com/";
- }
- if(FreshFramework.m_isRunningLocally)
- {
- return "http://localhost/";
- }
- return "/";
- }
- static function IsOnValidDomain()
- {
- return FreshFramework._isRunningLocally || FreshFramework._isRunningLocalRemoteDebug || _root._url.indexOf("http://www.jeffwofford.com") == 0;
- }
- static function get _doesSimulationExist()
- {
- return !!_root._simulation;
- }
- static function get _simulation()
- {
- if(_root._simulation)
- {
- }
- return _root._simulation;
- }
- static function Initialize(doCreateIfAbsent)
- {
- if(!_root._simulation && doCreateIfAbsent)
- {
- _root._simulation = new CSimulation();
- }
- }
- static function Shutdown()
- {
- delete _root._simulation;
- _root._simulation = null;
- }
- static function Update()
- {
- _root._simulation.Update();
- }
- }
-